home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / DevInfo / DeviceDevelopment / newstyle.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-15  |  3.0 KB  |  87 lines

  1. #ifndef     DEVICES_NEWSTYLE_H
  2. #define     DEVICES_NEWSTYLE_H
  3. /*------------------------------------------------------------------------*/
  4. /*
  5.  * $Id: newstyle.h 1.1 1997/05/15 18:53:15 heinz Exp $
  6.  *
  7.  * Support header for the New Style Device standard
  8.  *
  9.  * (C)1996-1997 by Amiga International, Inc.
  10.  *
  11.  */
  12. /*------------------------------------------------------------------------*/
  13.  
  14. /*
  15.  *  At the moment there is just a single new style general command:
  16.  */
  17.  
  18. #define     NSCMD_DEVICEQUERY       0x4000
  19.  
  20. struct NSDeviceQueryResult {
  21.     /*
  22.     ** Standard information, must be reset for every query
  23.     */
  24.     ULONG   DevQueryFormat;         /* this is type 0               */
  25.     ULONG   SizeAvailable;          /* bytes available              */
  26.  
  27.     /*
  28.     ** Common information (READ ONLY!)
  29.     */
  30.     UWORD   DeviceType;             /* what the device does         */
  31.     UWORD   DeviceSubType;          /* depends on the main type     */
  32.     UWORD   *SupportedCommands;     /* 0 terminated list of cmd's   */
  33.  
  34.     /* May be extended in the future! Check SizeAvailable! */
  35. };
  36.  
  37.  
  38. #define     NSDEVTYPE_UNKNOWN       0   /* No suitable category, anything */
  39. #define     NSDEVTYPE_GAMEPORT      1   /* like gameport.device */
  40. #define     NSDEVTYPE_TIMER         2   /* like timer.device */
  41. #define     NSDEVTYPE_KEYBOARD      3   /* like keyboard.device */
  42. #define     NSDEVTYPE_INPUT         4   /* like input.device */
  43. #define     NSDEVTYPE_TRACKDISK     5   /* like trackdisk.device */
  44. #define     NSDEVTYPE_CONSOLE       6   /* like console.device */
  45. #define     NSDEVTYPE_SANA2         7   /* A >=SANA2R2 networking device */
  46. #define     NSDEVTYPE_AUDIO         8   /* like audio.device */
  47. #define     NSDEVTYPE_CLIPBOARD     9   /* like clipboard.device */
  48. #define     NSDEVTYPE_PRINTER       10  /* like printer.device */
  49. #define     NSDEVTYPE_SERIAL        11  /* like serial.device */
  50. #define     NSDEVTYPE_PARALLEL      12  /* like parallel.device */
  51.  
  52.  
  53. /*------------------------------------------------------------------------*/
  54. /* The following defines should really be part of device specific
  55.  * includes. So we protect them from being redefined.
  56.  */
  57. #ifndef NSCMD_TD_READ64
  58. /*
  59.  *  An early new style trackdisk like device can also return this
  60.  *  new identifier for TD_GETDRIVETYPE. This should no longer
  61.  *  be the case though for newly written or updated NSD devices.
  62.  *  This identifier is ***OBSOLETE***
  63.  */
  64.  
  65. #define DRIVE_NEWSTYLE          (0x4E535459L)   /* 'NSTY' */
  66.  
  67.  
  68. /*
  69.  *  At the moment, only four new style commands in the device
  70.  *  specific range and their ETD counterparts may be implemented.
  71.  */
  72.  
  73. #define NSCMD_TD_READ64     0xC000
  74. #define NSCMD_TD_WRITE64    0xC001
  75. #define NSCMD_TD_SEEK64     0xC002
  76. #define NSCMD_TD_FORMAT64   0xC003
  77.  
  78. #define NSCMD_ETD_READ64    0xE000
  79. #define NSCMD_ETD_WRITE64   0xE001
  80. #define NSCMD_ETD_SEEK64    0xE002
  81. #define NSCMD_ETD_FORMAT64  0xE003
  82. #endif /* NSCMD_TD_READ64 */
  83.  
  84. /*------------------------------------------------------------------------*/
  85.  
  86. #endif /* DEVICES_NEWSTYLE_H */
  87.